/* GUI CONVERTED from rcrp02.p (converter v1.76) Thu Feb 28 19:34:09 2002 */
/* rcrp02.p - Release Management Customer Schedules - Schedule Compare        */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.8.1.4 $                                                         */
/*V8:ConvertMode=Report                                                       */
/* REVISION: 7.0    LAST MODIFIED: 01/29/92           BY: WUG *F110*          */
/* REVISION: 7.0    LAST MODIFIED: 03/20/92           BY: WUG *F312*          */
/* REVISION: 7.0    LAST MODIFIED: 03/26/92           BY: WUG *F323*          */
/* REVISION: 7.3    LAST MODIFIED: 10/13/92           BY: WUG *G462*          */
/* REVISION: 7.3    LAST MODIFIED: 08/30/93           BY: WUG *GE19*          */
/* REVISION: 7.3    LAST MODIFIED: 12/23/93           BY: WUG *GI32*          */
/* REVISION: 7.4    LAST MODIFIED: 10/28/94           BY: dpm *GN47*          */
/* REVISION: 7.4    LAST MODIFIED: 03/22/95           BY: aed *G0J0*          */
/* REVISION: 7.5    LAST MODIFIED: 04/24/95           BY: dpm *J044*          */
/* REVISION: 7.5    LAST MODIFIED: 02/22/96           BY: kjm *G1NR*          */
/* REVISION: 8.6    LAST MODIFIED: 05/20/98   BY: *K1Q4* Alfred Tan           */
/* REVISION: 9.1    LAST MODIFIED: 03/24/00   BY: *N08T* Annasaheb Rahane     */
/* REVISION: 9.1    LAST MODIFIED: 08/12/00   BY: *N0KP* Mark Brown           */
/* Old ECO marker removed, but no ECO header exists *F0PN*                    */
/* Revision: 1.8.1.3       BY: Jean Miller        DATE: 03/22/01  ECO: *P008* */
/* $Revision: 1.8.1.4 $    BY: Jean Miller        DATE: 02/28/02  ECO: *N1BB* */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

/* SCHEDULE COMPARE */

/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

{mfdtitle.i "b+ "}

define new shared variable global_schtype as integer.
define new shared variable impexp   like mfc_logical no-undo.
define new shared variable impexp_label as character format "x(8)" no-undo.

define variable schtype   like sch_type initial 1.
define variable schrlse_1 like sch_rlse_id.
define variable schrlse_2 like sch_rlse_id.
define variable schrlse_x like sch_rlse_id.
define variable undo_stat like mfc_logical no-undo.
define variable next_prompt_fldname as character no-undo.

define new shared buffer schmstr1 for sch_mstr.
define new shared buffer schmstr2 for sch_mstr.

{rcordfrm.i}


/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
   
 RECT-FRAME       AT ROW 1 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1 COLUMN 3 NO-LABEL VIEW-AS TEXT SIZE-PIXELS 1 BY 1
 SKIP(.1)  /*GUI*/
{rcordfma.i}
   skip(1)
   schtype              colon 18
   skip(1)
   schrlse_1            colon 18
   schrlse_2            colon 18
with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER INITIAL "".
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:HIDDEN in frame a = yes.
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5.  /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



/* SET EXTERNAL LABELS */
setFrameLabels(frame a:handle).

repeat with frame a:

   {rcgetord.i old}

   do on error undo, retry:
      update
         schtype
         schrlse_1
         schrlse_2
      with frame a
      editing:

         global_schtype = input schtype.
         {gpbrparm.i &browse=gplu544.p &parm=c-brparm3
                     &val="string(global_schtype)"}

         if frame-field = "schtype" then do:
            {mfnp05.i sch_mstr sch_tnlr
               "sch_nbr = sod_nbr and sch_line = sod_line"
               sch_type "input schtype"}
            if recno <> ? then display schtype sch_rlse @ schrlse_1.
         end.
         else

         if frame-field = "schrlse_1" or frame-field = "schrlse_2" then do:
            if frame-field = "schrlse_1" then
               schrlse_x = input schrlse_1.
            else
               schrlse_x = input schrlse_2.
            {mfnp05.i sch_mstr sch_tnlr
               "sch_type = input schtype and sch_nbr = sod_nbr
                           and sch_line = sod_line"
               sch_rlse_id  "schrlse_1"}
            if recno <> ? then do:
               if frame-field = "schrlse_1" then
                  display
                     schtype
                     sch_rlse @ schrlse_1.
               else
                  display
                     schtype
                     sch_rlse @ schrlse_2.
            end.
         end.

         else do:
            status input.
            readkey.
            apply lastkey.
         end.

      end.

      {gprun.i ""rcrp02b.p""
         "(input schtype,
           input sod_nbr,
           input sod_line,
           input-output schrlse_1,
           input-output schrlse_2,
           output undo_stat,
           output next_prompt_fldname)"}

      if next_prompt_fldname = "schrlse_1" then
         next-prompt schrlse_1 with frame a.

      if next_prompt_fldname = "schrlse_2" then
         next-prompt schrlse_2 with frame a.

      if undo_stat then undo, retry.

      display
         schrlse_1
         schrlse_2.

   end.

   /* OUTPUT DESTINATION SELECTION */
   {gpselout.i &printType = "printer"
               &printWidth = 132
               &pagedFlag = " "
               &stream = " "
               &appendToFile = " "
               &streamedOutputToTerminal = " "
               &withBatchOption = "no"
               &displayStatementType = 1
               &withCancelMessage = "yes"
               &pageBottomMargin = 6
               &withEmail = "yes"
               &withWinprint = "yes"
               &defineVariables = "yes"}
/*GUI*/ RECT-FRAME:HEIGHT-PIXELS in frame a = FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.


   {gprun.i ""rcrp02a.p""}

   {mfrtrail.i}

end.
